
title BUILD-CAA
@echo off
cd /d %~dp0
@REM CALL ipconfig

REM ----------------------
REM 配置自动编译方式，按照时间还是电脑名称(公司和家里使用不用的电脑)
REM Configure automatic compilation method based on time or computer name (computers used by company and family)
GOTO TIME
REM ----------------------


:TIME
chcp 936
@echo off
setlocal enabledelayedexpansion

for /f "tokens=1-4 delims=/: " %%a in ('date /t') do (
    set year=%%c
    set month=%%b
    set day=%%a
)

set hour=!time:~0,2!
set minute=!time:~3,2!

if !hour! LSS 12 (
    @ECHO "现在是上午，你在公司上班吧"
	@echo "I coding At The Company" && CALL mkGetPreq -p "D:\app\DS\B27_DS;"
	mkdir c:\temp\ && mkdir c:\tmp\
	CALL "C:\Program Files\Dassault Systemes\T27\win_b64\code\command\tck_init.bat"
	CALL tck_list
	CALL Tck_list V5_6R2017_B27 -all
	CALL tck_profile V5_6R2017_B27
) else if !hour! LSS 19 (
    @ECHO "现在是下午，你还在公司上班吧"
	@echo "I coding At The Company" && CALL mkGetPreq -p "D:\app\DS\B27_DS;"
	mkdir c:\temp\ && mkdir c:\tmp\
	CALL "C:\Program Files\Dassault Systemes\T27\win_b64\code\command\tck_init.bat"
	CALL tck_list
	CALL Tck_list V5_6R2017_B27 -all
	CALL tck_profile V5_6R2017_B27
) else if !hour! LSS 23 (
    @ECHO "现在是晚上，你回家加班了吧"
	@echo "I coding At Home" && CALL mkGetPreq -p "C:\Apps\DS\B27_DS\GTR3;"
	@echo ===========================================================
	mkdir c:\temp\ && mkdir c:\tmp\
	CALL "C:\Apps\DS\B27\win_b64\code\command\tck_init.bat"
	CALL tck_list
	CALL Tck_list V5_6R2017_B27 -all
	CALL tck_profile V5_6R2017_B27
	@echo ===========================================================

) else (
    @ECHO "哎呀太晚了，睡觉吧，别折腾了"
	timeout /t 10
)

endlocal

pause
exit


:LABTOP_NAME

set varA=%COMPUTERNAME%
if "%varA%"=="DESKTOP-2CG03KI" (
    echo %varA% -- "I coding At The Company" && CALL mkGetPreq -p "D:\app\DS\B27_DS;"
	@echo ===========================================================
	mkdir c:\temp\ && mkdir c:\tmp\
	CALL "C:\Program Files\Dassault Systemes\T27\win_b64\code\command\tck_init.bat"
	CALL tck_list
	CALL Tck_list V5_6R2017_B27 -all
	CALL tck_profile V5_6R2017_B27
	@echo ===========================================================

) else if "%varA%"=="DESKTOP-9I4G9M6" (
    echo %varA% -- "I coding At Home" && CALL mkGetPreq -p "C:\Apps\DS\B27_DS\GTR3;"
	@echo ===========================================================
	mkdir c:\temp\ && mkdir c:\tmp\
	CALL "C:\Apps\DS\B27\win_b64\code\command\tck_init.bat"
	CALL tck_list
	CALL Tck_list V5_6R2017_B27 -all
	CALL tck_profile V5_6R2017_B27
	@echo ===========================================================

) else (
    echo %varA% -- C
    echo CCC
)

REM CALL mkmk  -a -g -u  -brief && mkrtv && dir && pause  && CATIA-R27-DS.bat

pause
exit


